function SuperCls (name) {
    this.name = name
    this.friends = ['a']
}
SuperCls.prototype.superMethod = function () {
    console.log('SuperCls');
}
function OtherSuperCls (sex) {
    this.sex = sex
}
OtherSuperCls.prototype.otherSuperMethod = function () {
    console.log('otherSuperMethod');
}
// 拷贝父构造函数实例所有属性
function MyCls (name,sex) {
    SuperCls.call(this,name)
    OtherSuperCls.call(this,sex)
}
// 继承一个类
MyCls.prototype = Object.create(SuperCls.prototype)
// 重新指定constructor属性
MyCls.prototype.constructor = MyCls
// 混入其他
Object.assign(MyCls.prototype,OtherSuperCls.prototype)
MyCls.prototype.myMethod = function () {
    // do something
    console.log('do something');
}
let instance1 = new MyCls('ss','女')
instance1.friends.push('aa')
let instance2 = new MyCls('gg','男')
instance2.friends.push('bb')
console.log(instance1);
console.log(instance2);